package cn.lili.modules.payment.kit.dto.paypal;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class Resource {

    private Date create_time;
    private List<PurchaseUnits> purchase_units;
    private List<Links> links;
    private String id;
    private PaymentSource payment_source;
    private String intent;
    private Payer payer;
    private String status;

    @Data
    private static class PaymentSource {
        private Paypal paypal;

        @Data
        private static class Paypal {
            private String email_address;
            private String account_id;
            private String account_status;
            private Payer.Name name;
            private Payer.Address address;
        }
    }

    @Data
    private static class Payer {
        private Name name;
        private String email_address;
        private String payer_id;
        private Address address;

        @Data
        private static class Name {
            private String given_name;
            private String surname;
        }

        @Data
        private static class Address {
            private String country_code;
        }
    }

    @Data
    private static class Links {
        private String href;
        private String rel;
        private String method;
    }
}
